import request from '@/utils/request'

/**
 * 系统菜单分页查询
 * @param {查询条件} data
 */
export function getMenuPageList(data) {
  return request({
    url: 'dev/menu/pageList',
    method: 'post',
    data: data,
  })
}

export function getMenuTreeSelectList(data){
    return request({
        url: 'dev/menu/treeSelectList',
        method: 'post',
        data: data,
    })
}



/**
 * 新增系统菜单
 * @param data
 */
export function addMenu(data) {
  return request({
    url: 'dev/menu/add',
    method: 'post',
    data: data,
  })
}

/**
 * 修改系统菜单
 * @param data
 */
export function modifyMenu(data) {
  return request({
    url: 'dev/menu/modify',
    method: 'post',
    data: data,
  })
}



/**
 * 获取系统菜单详情
 * @param {Id}
 */
export function getMenuDetail(id) {
  return request({
    url: 'dev/menu/detail/' + id,
    method: 'get'
  })
}

/**
 * 删除系统菜单
 * @param {主键} pid
 */
export function delMenu(data) {
  return request({
    url: 'dev/menu/delete',
    method: 'post',
    data:data
  })
}

